package com.framework.loippi.service.impl;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.framework.loippi.dao.NoticeToUserDao;
import com.framework.loippi.entity.NoticeToUser;
import com.framework.loippi.service.NoticeToUserService;
import java.util.List;
/**
 * SERVICE - NoticeToUser(通知消息用户关联表)
 * 
 * @author wmj
 * @version 2.0
 */
@Service
public class NoticeToUserServiceImpl extends GenericServiceImpl<NoticeToUser, Long> implements NoticeToUserService {
	
	@Autowired
	private NoticeToUserDao noticeToUserDao;
	
	
	@Autowired
	public void setGenericDao() {
		super.setGenericDao(noticeToUserDao);
	}

	public List<NoticeToUser> findListByPage(Object parameter){
		return noticeToUserDao.findListByPage(parameter);
	}

	public Long deletes(Object parameter){
		return noticeToUserDao.deletes( parameter);
	}

	@Override
	public List<NoticeToUser> findByUserId(Long userId) {
		return noticeToUserDao.findByUserId(userId);
	}

	@Override
	public List<NoticeToUser> findNoticeUserByUserId(Long userId) {
		return noticeToUserDao.findNoticeUserByUserId(userId);
	}

	@Override
	public Long countUnreadNotice(Long userId) {
		return noticeToUserDao.countUnreadNotice(userId);
	}


}
